package com.initialize.common.tool.pojo;


/**
 * @program: star-blockchain
 * @description: 返回结果实体
 * @author: Mr.Jane
 * @create: 2019-09-22 00:52
 **/
public class Result {


    private int status_code;

    private Object result;


    public Result() {
    }

    public Result(Object result) {
        this.result = result;
    }

    public Result(int status_code, Object result) {
        this.status_code = status_code;
        this.result = result;
    }

    public static Result success(Object o) {
        return new Result(1, o);
    }

    public static Result error(Object o) {
        return new Result(0, o);
    }

    public int getStatus_code() {
        return status_code;
    }

    public void setStatus_code(int status_code) {
        this.status_code = status_code;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "result{" +
                "status_code=" + status_code +
                ", result=" + result +
                '}';
    }
}
